package 笔试题.跟谁学;

import java.util.Scanner;

//100 50 20 10 5 1
public class 找零钱 {
    static class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int input = sc.nextInt();
            int[] result = calculate(input);
            for (int i = 0; i < result.length; i++) {
                if (i == result.length - 1){
                    System.out.print(result[i]);
                }else {
                    System.out.print(result[i] + " ");
                }
            }
        }

        public static int[] calculate(int input) {
            int c100 = 0, c50 = 0, c20 = 0, c10 = 0, c5 = 0, c1 = 0;
            while (input >= 100) {
                input -= 100;
                c100++;
            }
            while (input >= 50) {
                input -= 50;
                c50++;
            }
            while (input >= 20) {
                input -= 20;
                c20++;
            }
            while (input >= 10) {
                input -= 10;
                c10++;
            }
            while (input >= 5) {
                input -= 5;
                c5++;
            }
            while (input >= 1) {
                input -= 1;
                c1++;
            }
            return new int[]{c100, c50, c20, c10, c5, c1};
        }
    }
}
